<template>
  <div class="grand-child">
    <h3>我是孙组件</h3>
    <h4>祖先给我的存款：{{qian}}</h4>
    <h4>祖先给我的座驾：{{che}}</h4>
    <h4>祖先给我的房子：{{fang}}</h4>
    <h4>祖先给我的朋友：{{pengyou}}</h4>
  </div>
</template>

<script>
  export default {
    name:'GrandChild',
    inject:['che','fang','qian','pengyou']
  }
</script>

<style lang="less" scoped>
  .grand-child{
    background-color: orange;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px black;
  }
</style>